const aItems = document.querySelectorAll('.item a');
// console.log(getRandomColor());
for (const aItem of aItems) {
    aItem.style.backgroundColor = getRandomColor();
}

function getRandomColor() {
    const colorItem = ['9','a','b','c','d','e','f'];
    const index1 = Math.floor(Math.random() * colorItem.length);
    const index2 = Math.floor(Math.random() * colorItem.length);
    const index3 = Math.floor(Math.random() * colorItem.length);
    const index4 = Math.floor(Math.random() * colorItem.length);
    const index5 = Math.floor(Math.random() * colorItem.length);
    const index6 = Math.floor(Math.random() * colorItem.length);
    return `#${colorItem[index1]}${colorItem[index2]}${colorItem[index3]}${colorItem[index4]}${colorItem[index5]}${colorItem[index6]}`;
}